package cn.itcast.dao;

import cn.itcast.domain.kefang;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import java.util.List;

@Repository
public interface kefangDao {
    @Select("select * from kefang")
    public List<kefang> findAllkefang();

    @Select("select * from kefang where num = #{num}")
    public kefang findkefangByNum(Integer num);
    
    @Insert("insert kefang VALUES (#{num},#{type},0)")
    public void insertkefang(kefang kf);

    @Update("update kefang set type=#{type},statue=#{statue} where num=#{num}")
    public void updatekefang(kefang kf);

    @Select("select * from kefang where statue = 0")
    public List<kefang> kefangByStatue();
}
